package com.xbxkj.commen.bean;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 商城小程序用户
 * </p>
 *
 * @author 张子艺
 * @since 2019-12-31
 */
@TableName("tr_user")
@ApiModel(value="User对象", description="商城小程序用户")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户的唯一标识")
    @TableField("openid")
    private String openid;

    @ApiModelProperty(value = "用户昵称")
    @TableField("nickname")
    private String nickname;

    @ApiModelProperty(value = "用户性别1男2女0未知")
    @TableField("sex")
    private String sex;

    @ApiModelProperty(value = "用户个人资料填写省份")
    @TableField("province")
    private String province;

    @ApiModelProperty(value = "普通用户个人资料填写的城市")
    @TableField("city")
    private String city;

    @ApiModelProperty(value = "国家，中国CN")
    @TableField("country")
    private String country;

    @ApiModelProperty(value = "用户头像 ")
    @TableField("headimgurl")
    private String headimgurl;

    @ApiModelProperty(value = "手机号 ")
    @TableField("phone")
    private String phone;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }
    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }
    public String getHeadimgurl() {
        return headimgurl;
    }

    public void setHeadimgurl(String headimgurl) {
        this.headimgurl = headimgurl;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "User{" +
            "id=" + id +
            ", openid=" + openid +
            ", nickname=" + nickname +
            ", sex=" + sex +
            ", province=" + province +
            ", city=" + city +
            ", country=" + country +
            ", headimgurl=" + headimgurl +
        "}";
    }
}
